base_path=$(cd `dirname $0`; pwd)
echo $base_path

dist_path=$base_path/../dist
echo $dist_path
customer_path=$dist_path/customer
echo $customer_path

cd $base_path/../
rm -rf $customer_path

$base_path/../gradlew app-native:dist
$base_path/../gradlew app-core:dist
$base_path/../gradlew app-third:dist

mkdir -p $customer_path/aar
mkdir -p $customer_path/jar
mkdir -p $customer_path/version

find $dist_path -name "*.aar" -exec cp {} $customer_path/aar \;
find $dist_path -name "*.jar" -exec cp {} $customer_path/jar \;
find $dist_path -name "szca-*-version" -exec cp {} $customer_path/version \;